<template>
  <j-modal title="提交意见" :width="600" :visible="visible" switchFullscreen @cancel="handleCancel" @ok="handleOk">
    <a-form-model ref="form" layout="vertical" :model="form">
      <a-form-model-item label="建议跟进重点及注意事项:" class="item2" prop="supervisorOpinion" :rules="{required: true, message: '请输入', trigger: ['blur']}">
        <a-textarea v-model="form.supervisorOpinion" placeholder="请输入" :auto-size="{ minRows: 6, maxRows: 20 }" />
      </a-form-model-item>
      </a-row>
    </a-form-model>
  </j-modal>
</template>
<script>
import { estimateUpdate } from '@/api/sjsk/estimate/list/index'
export default {
  name: 'IdeaModal',
  data() {
    return {
      visible: false,
      form: {
        sjskPersonId: '', //	社戒社康人员id		false	
        supervisorOpinion: '', //	督导意见
      },
      
      startValue: undefined,
      isDisabled: true,
    }
  },
  async created() {
  },
  methods: {
    show(item) {
      Object.assign(this.form, item)
      this.visible = true
    },
    onStartChange() {

    },
    resetForm() {
      return {
        sjskPersonId: '', //	社戒社康人员id		false
        supervisorOpinion: '', //	督导意见
        
      }
    },
    handleCancel() {
      this.form = this.resetForm()
      this.visible = false
    },
    handleOk() {
      this.$refs.form.validate().then(res => {
        estimateUpdate(this.form).then(res => {
          this.visible = false
          this.form = this.resetForm()
          this.$message.success('提交成功')
        })
      })
    }
  },
}
</script>
<style lang="less" scoped>
.box1 {
  margin-left: 5.2%;

  span {
    display: inline-block;
    width: 80px;
    text-align: right;
  }
}

.pt {
  margin-top: 20px;
  // font-size: 16px;
  font-weight: bold;
  padding-top: 20px;
  border-top: 1px dotted #E9E9E9;
}

.item1 {
  width: 100%;

  /deep/.ant-col-8 {
    width: 11.5%;
    // text-align: left;
  }

  /deep/.ant-col-16 {
    width: 70%;
    text-align: left;
  }
}

/deep/.ant-col-8 {
  width: 27.5%;
  // text-align: left;
}

.item2 {
  /deep/.ant-col-8 {
    width: 11.5%;
    // text-align: left;
  }

  /deep/.ant-col-16 {
    width: 50%;
    text-align: left;
  }
}
</style>
